package com.tanhua.manage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tanhua.manage.pojo.Admin;
import com.tanhua.manage.vo.AdminRoleVo;
import com.tanhua.manage.vo.UserVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AdminMapper extends BaseMapper<Admin> {
    public IPage<AdminRoleVo> findAdminRole(Page<AdminRoleVo> userPage, @Param("adminName") String adminName);

    @Insert("insert into tb_admin_admin_role values (null,#{adminId},#{roleId})")
    void insertAdminAndRoleIdPressionId(@Param("adminId") Long adminId, @Param("roleId") Integer roleId);
}
